package com.woniuxy.dao;

import java.util.List;
import org.apache.ibatis.annotations.Mapper;

import com.woniuxy.entity.ChooseCourse;
import com.woniuxy.entity.CoachInfo;
import com.woniuxy.entity.Course;
import com.woniuxy.entity.GymCoach;
import com.woniuxy.entity.Style;
import com.woniuxy.entity.User;

/**
 * 教练相关dao
 * 
 * @author lishuwei
 *
 */

@Mapper
public interface CoachDao {
//获取所有教练
	public List<User> allCoaches();

//根据id查询用户
	public User getUserById(long id);
	


//根据经度纬度查询一个正方形范围内的所有用户
	public List<User> getUsersByLatitudeAndLongitude(double latitudeMax, double latitudeMin, double longitudeMax,
			double longitudeMin);

// 申请签约场馆
	public int addGymCoach(GymCoach gymCoach);

//更新基础信息
	public int updateUserBaseInfo(User user);

//更新教练（额外）信息
	public int updateExtraInfo(CoachInfo coachInfo);

//删除基础信息
	public int deleteBaseById(long id);

//删除教练（额外）信息
	public int deleteExtraById(long userId);

//根据userid获取教练额外信息
	public CoachInfo getCoachInfoById(long id);

//获取教练的流派
	public List<Style> getStylesById(long id);

//获取教练的课程
	public List<Course> getCoursesById(long id);

//获取学生的数量
	public int getStudentsNum(long id);

//获取分页学生数据
	public List<User> getStudentsByPage(long id, int i, int pagesize);

	public int getSignsNum(long id);

	public List<GymCoach> getSignsByPage(long id, int i, int pagesize);

	public void updateSignStatus(long sid, String status);

	public int getSignsCoachesNum(long id);

	public List<User> getSignsCoachesByPage(long id, int i, int pagesize);

	public Course getCourseById(long courseId);

	public ChooseCourse getChooseCourseById(long chooseId);

	
}
